/**
 * 全局注册mixin
 */
// import user from "@/mixins/user.js"
// import gymUser from "@/mixins/gym_member.js"
const install = (Vue, vm) => {
	const modulesFiles = require.context('./', true, /\.js/)
	const modules = modulesFiles.keys().reduce((modules, modulePath) => {
	    const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
	    const value = modulesFiles(modulePath)
		console.log(value.default.name, value.default)
		Vue.mixin(value.default)
		// console.log(value);
		for (let key in value) {
			// console.log(key);
			// Vue.filter(key,value[key])
		}
	    return modules
	}, {})
	// Vue.mixin(user)
	// Vue.mixin(gymUser)
}

export default {
	install
}